<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

<ui:composition template="/layouts/default.xhtml">
    <ui:define name="title">#{text['home.title']}</ui:define>
    <ui:param name="menu" value="Home"/>

    <ui:define name="body">
        <h:form id="acceuilForm">
        	<div class="row">
	        	<div class="col-sm-3 form-group">
	        		<h:commandLink rendered="#{p:ifGranted('ROLE_ADMIN')}" action="#{eleveController.viewEleveForm}">
			        	<p class="home-box">
							<h:outputText style="color: gray;" value="#{text['menu.home.eleve.inscription']}" escape="true"/><br/>
					      	<p:graphicImage url="/images/new-inscription.png"></p:graphicImage><br/>
						</p>
					</h:commandLink>
				</div>
				
				<div class="col-sm-3 form-group">
					<h:commandLink action="/eleves">
						<p class="home-box">
			        		<h:outputText style="color: gray;" value="#{text['menu.home.eleve.list']}" escape="true"/><br/>
					      	<p:graphicImage url="/images/eleve-list.png" width="100" height="110"></p:graphicImage>
						</p>
					</h:commandLink>
				</div>
				
				<div class="col-sm-3 form-group">
					<h:commandLink rendered="#{p:ifGranted('ROLE_ADMIN')}" action="#{paiementController.edit}">
						<p class="home-box">
			        		<h:outputText style="color: gray;" value="#{text['menu.home.eleve.paiement']}" escape="true"/><br/>
					      	<p:graphicImage url="/images/new-pay.png" width="100" height="110"></p:graphicImage>
						</p>
					 </h:commandLink>
				</div>
			</div>
			
			<div class="row">
				<div class="col-sm-3 form-group">
					<h:commandLink rendered="#{p:ifGranted('ROLE_ADMIN')}" action="/classes">
						<p class="home-box">
			        		<h:outputText style="color: gray;" value="#{text['menu.home.classe']}" escape="true"/><br/>
					      	<p:graphicImage url="/images/classe.png" width="100" height="110"></p:graphicImage>
						</p>
					</h:commandLink>
				</div>
				<div class="col-sm-3 form-group">
					<h:commandLink rendered="#{p:ifGranted('ROLE_ADMIN')}" action="/admin/users">
				        	<p class="home-box">
								<h:outputText style="color: gray;" value="#{text['menu.home.users']}" escape="true"/><br/>
						      	<p:graphicImage url="/images/users.png" ></p:graphicImage>
							</p>
					</h:commandLink>
				</div>
				<div class="col-sm-3 form-group">
					<h:commandLink rendered="#{p:ifGranted('ROLE_ADMIN')}" action="#{userForm.add}">
							<p class="home-box">
				        		<h:outputText style="color: gray;" value="#{text['menu.home.user.add']}" escape="true"/><br/>
						      	<p:graphicImage url="/images/add-user.png" width="100" height="110"></p:graphicImage>
							</p>
					</h:commandLink>
				</div>
			</div>
        </h:form>
    </ui:define>
</ui:composition>
</html>
